package org.xshop.web.biz;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xshop.model.TOrder;
import org.xshop.service.ITOrderService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import top.ibase4j.core.base.BaseController;
import top.ibase4j.core.util.WebUtil;

/**
 * <p>
 *   前端控制器
 * </p>
 *
 * @author ShenHuaJie123
 * @since 2018-03-01
 */
@RestController
@RequestMapping("/thrade")
@Api(value = "接口", description = "接口")
public class ThradeController extends BaseController<TOrder, ITOrderService> {
    @RequiresPermissions("trade.read")
    @PutMapping(value = "/read/list")
    @ApiOperation(value = "查询", produces = MediaType.APPLICATION_JSON_VALUE)
    public Object query(HttpServletRequest request) {
        Map<String, Object> param = WebUtil.getParameter(request);
        param.put("state", "3");
        return super.query(param);
    }
}